pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut p1 = 0;
    let mut p2 = 1;
    let mut sum = 0;
    let mut tmp = p1 + p2;
    while tmp < threshold {
        if tmp % 2 == 1 {
            sum += tmp;
        }
        tmp = p1 + p2;
        p1 = p2;
        p2 = tmp;
    }
    sum
}
